import request from '@/utils/request'

/**
 * 获取字典列表
 */
export const getDictionaryList = (data) => {
    
    return request({
        url: '/admin/dictionary_type/list',
        method: 'post',
        data
    })
}

/**
 * 新增字典
 */
export const addDictionary = (data) => {
    return request({
        url: '/admin/dictionary_type/add',
        method: 'post',
        data
    })
}

/**
 * 编辑字典
 */
export const updateDictionary = (data) => {
    return request({
        url: '/admin/dictionary_type/edit',
        method: 'post',
        data
    })
}




/**
 * 根据字典类型(typeKey)获取字典数据
 */
export const getDictionaryDataByTypeKey = (data) => {
    return request({
        url: '/admin/dictionary_data/list',
        method: 'post',
        data
    })
}

/**
 * 新增字典数据
 */
export const addDictionaryData = (data) => {
    return request({
        url: '/admin/dictionary_data/add',
        method: 'post',
        data
    })
}

/**
 * 编辑字典数据
 */
export const updateDictionaryData = (data) => {
    return request({
        url: '/admin/dictionary_data/edit',
        method: 'post',
        data
    })
}
